package edu.jit.flowers.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import edu.jit.flowers.bean.Orderdetails;
import edu.jit.flowers.service.OrderdetailsService;
import edu.jit.flowers.utils.BaseServlet;

public class OrderDetailsServlet extends BaseServlet {
	private static final long serialVersionUID = 1L;
    private OrderdetailsService otService = new OrderdetailsService();
    //后台获取订单详情根据订单id
    public String getOrderdetails(HttpServletRequest request, HttpServletResponse response) {
    	Orderdetails orderd = otService.getAllOrderdetails();
    	request.setAttribute("orderdetails", orderd);
    	return "forword:backJsp/orderShow.jsp";
    }
  //前端获取订单详情根据订单id
    public String getdetails(HttpServletRequest request, HttpServletResponse response) {
    	Orderdetails orderd = otService.getAllOrderdetails();
    	request.setAttribute("orderdetails", orderd);
    	return "forword:backJsp/orderShow.jsp";
    }
}
